<template>
  <div class="address-com">
    <div v-show="showDelete" class="list-item-delete">
      <span class="pull_left">{{ item.text }}</span>
      <span class="pull_right" @click.stop="deleteCurItem(item, index)"
        >删除</span
      >
    </div>
    <!-- 样式1 -->
    <div v-if="item.stylesType == 0">
      <div class="styleOne">
        <div class="address-box">
          <span>
            <img src="http://oss.ztwlxx.cn/addressF.svg" alt="" />
          </span>
          <span class="font">地址：{{ item.addressval.address }}</span>
          <span>
            <img src="http://oss.ztwlxx.cn/poneF.svg" alt="" />
          </span>
        </div>
      </div>
    </div>
    <!-- 样式2 -->
    <!-- <div v-else></div> -->
  </div>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => {}
    },
    index: {
      type: Number,
      default: -1
    },
    showDelete: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    deleteCurItem(e, i) {
      this.$emit("deleteCurItem", e, i);
    }
  }
};
</script>

<style lang="scss" scoped>
.address-com {
  position: relative;
  .styleOne {
    background-color: #fff;
    .address-box {
      width: 100%;
      height: 50px;
      padding: 0px 8px;
      display: table;
      img {
        width: 30px;
        margin-top: 10px;
      }
      .font {
        margin: 0;
        display: table-cell;
        font-size: 12px;
        vertical-align: middle;
        height: 50px;
        width: 286px;
      }
    }
  }
}
</style>
